This invention relates generally to query optimizers, and more particularly to analyzing optimizers and other types of software components upon the occurrence of errors or crashes to determine the causes, i.e., to “troubleshoot” or “de-bug” the component.
Reproducing bugs (defects, exceptions, runtime errors, etc.) in software components is typically difficult and time-consuming. Obtaining the necessary information to reproduce the problem is often difficult, if not impossible, and requires significant manual effort. Collecting bug details must usually be done after a crash when the system is in an unstable state and some of the necessary troubleshooting information may be unrecoverable.
Query optimizers are among the most complex software components in any database system, and they naturally tend to contain software defects which cause unexpected errors. Despite significant efforts in quality assurance, unexpected errors are occasionally encountered. A self-contained “bug repro” that enables replication of the problem is often the best approach to a speedy resolution. Without a live reproduction scenario, diagnosing and de-bugging software defects in a query optimizer is usually very time consuming and costly. Capturing all the information needed to recreate an issue in the laboratory setting that was originally encountered on a production system is a difficult challenge that requires significant manual interaction, skill, and expertise. This is particularly so for query optimizers. Repros are notoriously difficult to obtain as they require schema definition, the offending query, the system configuration, and many other pieces of data that are difficult to capture in a consistent and accurate way.
There is a need for a mechanism for automatically capturing self-contained executable repro files for problems that occur in software components, such as query optimizers, which is triggered automatically upon the occurrence of a problem with the software component, or upon request. The repro files need to capture the necessary input to the software components and the relevant system state necessary to reproduce the problem, and they should be minimal and portable. It is to these ends that the present invention is directed.